<template>
  <div class="line-list">
    <div
      v-for="line in metroStore.lines"
      :key="line.id"
      @click="selectLine(line)"
      :class="{ active: line.id === metroStore.choosedLine?.id }"
    >
      {{ line.name }}
    </div>
  </div>
</template>
<script setup>
import { useMetroStore } from '@/store/metroStore'
const metroStore = useMetroStore()
const selectLine = (line) => {
  metroStore.choosedLine = line
  // 选中线路后可 emit 或调用渲染轨迹函数
}
</script>
